package top.yexuejc.demo;

/**
 * 响应对象类
 * @author maxiaofeng
 * @date 2025/6/19 11:37
 */
public class Response {
    private final int statusCode;
    private final String statusMessage;
    private final String contentType;
    private  byte[] content;

    public Response(int statusCode, String statusMessage, String contentType, byte[] content) {
        this.statusCode = statusCode;
        this.statusMessage = statusMessage;
        this.contentType = contentType;
        this.content = content;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public String getStatusMessage() {
        return statusMessage;
    }

    public String getContentType() {
        return contentType;
    }

    public byte[] getContent() {
        return content;
    }

    public int getContentLength() {
        return content.length;
    }

    public Response setContent(byte[] content) {
        this.content = content;
        return this;
    }
}
